package com.hq.ims.data.entityenum;

import com.hq.web.penum.IBaseEnum;

public enum EnumReceiveStatus implements IBaseEnum {

    /**
     *
     */
    UnReceive(0, "未接收"),
    Receive(1, "已接收"),
    SectionReceive(2, "部分接收"),
    Rejection(3, "已拒绝");

    private final int code;
    private final String typeName;

    EnumReceiveStatus(int code, String typeName) {
        this.code = code;
        this.typeName = typeName;
    }


    public static EnumReceiveStatus getEnumReceiveStatus (Integer code) {
        for(EnumReceiveStatus enumReceiveStatus: EnumReceiveStatus.values()){
            if(code == enumReceiveStatus.getCode()){
                return enumReceiveStatus;
            }
        }
        return null;
    }
    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getValue() {
        return typeName;
    }
}
